﻿/**********************************************************************
 * @file   GUISEASubSysBaseDialog.h
 * @brief  SEA子系统窗口基类
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2025-02-28
 *********************************************************************/
#ifndef _GUISEASubSysBaseDialog_H
#define _GUISEASubSysBaseDialog_H

#include "GUISubSystemDialogAPI.h"
#include "GUIWidget/GUIDialogBase.h"

namespace Core
{
    class FITKActionOperator;
}

namespace Acoustics
{
    class FITKAbstractSEASubSys;
}

namespace GUI
{
    /**
     * @brief FE子系统窗口基类
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date 2024-10-23
     */
    class GUISubSystemDialogAPI GUISEASubSysBaseDialog : public GUIDialogBase
    {
        Q_OBJECT;
    public:
        /**
         * @brief FESubsys object dialog
         * @param[i]  obj            My Param doc
         * @param[i]  oper           operator
         * @param[i]  parent
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        GUISEASubSysBaseDialog(Acoustics::FITKAbstractSEASubSys* obj, Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
         * @brief Destroy object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        virtual ~GUISEASubSysBaseDialog();
        /**
         * @brief    初始化
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-09
         */
        virtual void initData() = 0;

    protected slots:
        /**
         * @brief    关闭槽
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        virtual void reject() override;
        /**
         * @brief    对话框确定事件重写
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-06
         */
        virtual void accept() override;

    protected:
        /**
         * @brief    创建数据对象
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-06
         */
        bool createObjData();
        /**
         * @brief    编辑数据对象
         * @return   boiol
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-06
         */
        bool editObjData();
        /**
         * @brief    从管理器中获取新名称
         * @return   QString
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-10-24
         */
        QString ckeckNameFromMgr(QString name);
        /**
         * @brief    从界面获取数据
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-09
         */
        virtual void getDataFormWidget() = 0;
        /**
         * @brief    从界面里获取设置的名称
         * @return   QString
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-10
         */
        virtual QString getNameFormWidget() = 0;
        /**
         * @brief    获取整合的id链表的数据
         * @param[i] idList 
         * @return   QString
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-21
         */
        QString getIDListConsolidatedStr(QList<int> idList);

    protected:
        /**
         * @brief    显示事件
         * @param[i] event                 事件对象
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-10
         */
        void showEvent(QShowEvent* event);
        /**
         * @brief    取消高亮事件
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-06
         */
        void disHight();

    protected:
        /**
         * @brief FE子系统数据对象
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Acoustics::FITKAbstractSEASubSys* _obj = nullptr;
        /**
         * @brief 操作器对象
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Core::FITKActionOperator* _oper = nullptr;
        /**
         * @brief  是否是创建
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        bool _isCreate = false;
        /**
        * @brief  执行脚本
        * @author wangning (2185896382@qq.com)
        * @date   2025-03-04
        */
        QStringList _pyStr{};
    };
}

#endif
